#include <iostream>
#include <string.h>
#define int long long
using namespace std;
bool a[(int)(1e13+5)];



signed main(){
	int sum=0;
	int ans=1;
	int q;
	cin>>q;
	int c=q; 
	for(int i=2;i<c;i++){
		if(a[i])
			continue;
		for(int j=i;j<c;j+=i)
			a[i] = true;
		while(c%i == 0){
			ans *= i;
			c /= i;
			sum++;
			if(sum >= 2)
				break;
		}
		if(sum >= 2)
			break;
	}
	if(ans == 1){
		cout<<1<<endl<<0;
	}
	else if(ans == q  ||  sum < 2){
		cout<<2;
	}
	else{
		cout<<1<<endl<<ans;
	}
	return 0;
}
